import axios from "@/api/http";


// 获取首页数据
let timestamp = new Date().getTime();
const homeData = () => {
    return axios.get('/wangyi/xhr/index.json?csrf_token=1e2a40464e638c7fd96cd7e26f7844c0&__timestamp=' + timestamp + '&')
}
// https://m.you.163.com/item/list.json?csrf_token=1e2a40464e638c7fd96cd7e26f7844c0&__timestamp=1625575195869&categoryId=1019000
const listData = (obj) => {
    return axios.get('/wangyi/item/list.json', { params: obj })
}

const detailData = (itemId) => {
    return axios.get('/wangyi/item/' + itemId)
    // 瀑布流数据
    const aprilivy = () => {
        return axios.get('/wangyi/topic/v1/find/recAuto.json?page=10&size=2&exceptIds=');
    }
    // 头部导航列表数据
    const know = () => {
        return axios.get('/wangyi/topic/v1/know/navWap.json');
    }

    // 搜索数据
    const search = () => {
        return axios.post('/wangyi/xhr/search/init.json', {
            csrf_token: '147f33c6e02b8258a855564a68ab8749'
        })
    }
    export default {
        homeData,
        listData,
        detailData
    aprilivy,
        know,
        search
    };